var form_panel;
Ext.onReady(function() {
	Ext.tip.QuickTipManager.init();
	form_panel = Ext.create("Ext.form.Panel", {
		border : true,
		frame : true,
		renderTo : 'main_div',
		id : 'form_panel',
		buttons : [ {
			text : 'send',
			handler : send
		}, {
			text : 'reset',
			handler : resetForm
		} ],
		items : [ {
			labelAlign : 'right',
			fieldLabel : 'content',
			id : 'content',
			name : 'content',
			xtype : 'htmleditor',
			enableColors : true,
			enableAlignments : true,
			width : 500,
			height : 400
		} ]
	});
});
function send() {
	form_panel.submit({
		url : rootPath + '/springmail/send.do',
		success : function(form, action) {
			Ext.Msg.alert('Status', '发送成功！');
		},
		failure : function(form, action) {
			Ext.Msg.alert('Status', '发送失败！');
		}
	});
}
function resetForm() {
	form_panel.getForm().reset();
}